import request from "@/utils/request";

// 今日推荐列表
export function zcyxPageByQo(params) {
  return request({
    url: "/dinner/product/zcyx/get",
    method: "post",
    params
  });
}

// 入选商品
export function zcyxSave(data) {
  return request({
    url: '/dinner/product/zcyx/save',
    method: 'post',
    data
  })
}

// 编辑商品
export function zcyxUpdate(data) {
  return request({
    url: '/dinner/product/zcyx/update',
    method: 'post',
    data
  })
}

// 删除商品
export function zcyxRemove(data) {
  return request({
    url: '/dinner/product/zcyx/remove',
    method: 'post',
    data
  })
}

// 公众号订单详情
export function zcyxWXOrderDetail(params) {
  return request({
    url: "/front/order/zcyx/detail",
    method: "post",
    params
  });
}

// 优惠券分页查询
export function couponPageByQo(params) {
  return request({
    url: '/dinner/coupon/pageByQo',
    method: 'post',
    params
  })
}

// 优惠券生成
export function couponSave(params) {
  return request({
    url: '/dinner/coupon/save',
    method: 'post',
    params
  })
}

// 优惠券删除
export function couponRemove(params) {
  return request({
    url: '/dinner/coupon/removeByIds',
    method: 'post',
    params
  })
}

// 分页查询轮播图
export function indexRollPageByQo(params) {
  return request({
    url: "/dinner/advisement/pageByQo",
    method: "post",
    params
  });
}

// 批量删除轮播图
export function indexRollRemoveByIds(params) {
  return request({
    url: "/dinner/advisement/removeByIds",
    method: "post",
    params
  });
}

// 批量上下架轮播图
export function indexRollUpByIds(params) {
  return request({
    url: "/dinner/advisement/upOrDown",
    method: "post",
    params
  });
}

// 某个用户订单总数量统计，订单总金额统计，客单价统计 登录次数统计 商品点击次数统计
export function queryMemberDataAnalysis(params) {
  return request({
    url: "/dinner/data/analysis/queryMember",
    method: "post",
    params
  });
}

// 平台商品统计
export function queryProductDataAnalysis(params) {
  return request({
    url: "/dinner/data/analysis/queryProduct",
    method: "post",
    params
  });
}

// 平台商品统计
export function queryArticleDataAnalysis(params) {
  return request({
    url: "/dinner/data/analysis/queryArticle",
    method: "post",
    params
  });
}

// 订单统计
export function queryOrderDataAnalysis(params) {
  return request({
    url: "/dinner/data/analysis/queryOrder",
    method: "post",
    params
  });
}

// 业务员统计
export function queryBusinessManDataAnalysis(params) {
  return request({
    url: "/dinner/data/analysis/queryBusinessMan",
    method: "post",
    params
  });
}

// 复制商品到专柜区
export function copyProductToCounter(params) {
  return request({
    url: "/dinner/product/copyToCounter",
    method: "post",
    params
  });
}

// 复制商品到专柜区
export function getBarProductQrcode(params) {
  return request({
    url: "/dinner/product/qrcode",
    method: "post",
    params
  });
}